<template>
  <div>
    <div @click="fatherFn">
      <p @click.stop="oneFn">点击阻止冒泡</p>
      <a @click.prevent.stop href="http://www.baidu.com">阻止默认行为</a>
      <p @click.once="onceFn">只能执行一次</p>
    </div>
  </div>
</template>

<script>
export default {
  methods: {
    fatherFn() {
      console.log("触发");
    },
    oneFn() {
      console.log("被点击了");
    },
    onceFn(){
      console.log('看看有几次');
    }
  },
};
</script>

<style>
</style>